//
//  YTFollowAuthorHeaderView.m
//  yitaicaijing
//
//  Created by DIANGHONG on 2018/7/26.
//  Copyright © 2018年 DIANGHONG. All rights reserved.
//

#import "YTFollowAuthorHeaderView.h"
@interface YTFollowAuthorHeaderView()

@property (weak, nonatomic) IBOutlet UIView *containerView;

@end
@implementation YTFollowAuthorHeaderView

+ (instancetype)headerView
{
    UINib *nib = [UINib nibWithNibName:@"YTFollowAuthorHeaderView" bundle:nil];
    YTFollowAuthorHeaderView *view = [nib instantiateWithOwner:nil
                                                       options:nil][0];
    return view;
}

- (void)awakeFromNib
{
    [super awakeFromNib];
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(viewTap)];
    
    [self.containerView addGestureRecognizer:tap];
}

- (void)viewTap
{
    NSAssert(self.viewClickBlock != nil, @"viewClickBlock 不能为nil");
    
    self.viewClickBlock();
}
@end
